Blitz (26/40)

From:David McMinn
Date:24 Sep 2001 at 11:43:19
Subject:RE: MUI Image remapping

Hi Steve,

>DM>> I've tried using both ObtainBestPenA_ and BDGfx.lib, both of which fail
>DM>> to correctly remap the palette on 128 col AGA screens.
>DM>
>DM> How do you mean failed? Are the colours completely wrong? Are they all
>DM> the same? Or are they close to what they should be, but just butt ugly?
>
>Some are close (but I know that there are better matches in the palette),
>but the result is butt ugly.

I assume you've tried changing the precision? Apart from that, there's not
much else you can do with OBP. You could try writing your own colour matching
routine and then use ObtainPen to lock it.

>DM> I think I sent some code for doing this to the list recently (in the
>DM> last 2- 3 months anyway).
>
>I must have missed that.

Well, it just used ObtainBestPen, so you'd probably get the same results with
my code.

>DM>> Is there anyway to use Newicon.library to grab the image from an icon,
>DM>> mapped appropriately, into a blitz shape. or:-
>DM>
>DM> I think the NIB (NewIcon Blitz) routines do this. From Aminet/dev/basic.
>
>Yep, I've got that, and had a look at it, but I can't figure out how to get
>the mapped image to a bitmap without displaying it first.

Use the remap routine to remap it and then just alter the NIBDrawImage routine
so that instead of drawing to a Window, it draws to a rastport. You can easily
set up a rastport to point to a Blitz bitmap, or even a shape (via
ShapesBitMap).

InitRastPort_ &rp.RastPort
rp.BitMap = Addr BitMap(0)
; You can now draw to the Blitz bitmap through the rp rastport



|) /\ \/ ][ |) |\/| c |\/| ][ |\| |\| | dave@blitz-2000.co.uk
http://david-mcminn.port5.com | ICQ=16827694

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie